pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    if threshold == 0 {
        return 0;
    }
    if threshold == 1 {
        return 1;
    }
    if threshold == 2 {
        return 2;
    }
    let mut res = 2;

    let mut a = 1;
    let mut b = 1;
    let mut c = a + b;

    while c < threshold {
        if c % 2 == 1 {
            res += c;
        }

        a = b;
        b = c;
        c = a + b;
    }
    res
}
